package com.settlement.system.model.entity.common;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.BooleanEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.settlement.system.common.annotation.AdmitCustomizedExpore;
import com.settlement.system.converter.BigNumberFormatConvert;
import com.settlement.system.converter.DateFormatConvert;
import com.settlement.system.converter.OrderIsAduitConverter;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单稽核报表
 *
 * @author Ximi
 * @since 2020-09-22
 */
@AdmitCustomizedExpore(name = "OR-订单稽核报表")
@Data
@ExcelIgnoreUnannotated
@HeadStyle(fillBackgroundColor = 9, fillForegroundColor = 9, wrapped = BooleanEnum.FALSE)
@HeadRowHeight(value = 20)
@HeadFontStyle(fontHeightInPoints = 11)
public class TblOrderAuditReport extends BaseModel implements Serializable {


    /**
     * 发退货时间
     */
    @ExcelProperty(value = "发退货时间", converter = DateFormatConvert.class)
    @ApiModelProperty(value = "发退货时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date outDate;

    /**
     * 下单时间
     */
    @ExcelProperty(value = "下单时间", converter = DateFormatConvert.class)
    @ApiModelProperty(value = "下单时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date orderDate;

    /**
     * 订单二级来源编码
     */
    @ExcelProperty(value = "订单二级来源编码")
    @ApiModelProperty(value = "订单二级来源编码")
    private String orderSourceNo;

    /**
     * 订单来源
     */
    @ExcelProperty(value = "订单来源")
    @ApiModelProperty(value = "订单来源")
    private String orderSource;

    /**
     * 订单三级来源编码
     */
    @ExcelProperty(value = "订单三级来源编码")
    @ApiModelProperty(value = "订单三级来源编码")
    private String threeLevelChannelNo;

    /**
     * 订单三级来源名称
     */
    @ExcelProperty(value = "订单三级来源名称")
    @ApiModelProperty(value = "订单三级来源名称")
    private String threeLevelChannelName;

    /**
     * 优购主订单号
     */
    @ExcelProperty(value = "优购主订单号", converter = BigNumberFormatConvert.class)
    @ApiModelProperty(value = "优购主订单号")
    private String refBillNo;

    /**
     * 原始外部订单号
     */
    @ExcelProperty(value = "原始外部订单号", converter = BigNumberFormatConvert.class)
    @ApiModelProperty(value = "原始外部订单号")
    private String spOrderNo;

    /**
     * po单号
     */
    @ExcelProperty(value = "PO单号")
    @ApiModelProperty(value = "PO单号")
    private String poNo;

    /**
     * 渠道编码
     */
    @ExcelProperty(value = "渠道编码")
    @ApiModelProperty(value = "渠道编码")
    private String channelNo;

    /**
     * 渠道
     */
    @ExcelProperty(value = "渠道")
    @ApiModelProperty(value = "渠道")
    private String channelName;

    /**
     * 店铺编码
     */
    @ExcelProperty(value = "店铺编码")
    @ApiModelProperty(value = "店铺编码")
    private String shopNo;

    /**
     * 店铺名称
     */
    @ExcelProperty(value = "店铺名称")
    @ApiModelProperty(value = "店铺名称")
    private String shopName;

    /**
     * 入账主体
     */
    @ExcelProperty(value = "入账主体")
    @ApiModelProperty(value = "入账主体")
    private String companySubject;

    /**
     * 店铺账号
     */
    @ExcelProperty(value = "店铺账号")
    @ApiModelProperty(value = "店铺账号")
    private String shopAccount;

    /**
     * NC店铺编码
     */
    @ExcelProperty(value = "NC店铺编码")
    @ApiModelProperty(value = "NC店铺编码")
    private String ncShopNo;

    /**
     * NC店铺名称
     */
    @ExcelProperty(value = "NC店铺名称")
    @ApiModelProperty(value = "NC店铺名称")
    private String ncShopName;

    /**
     * 发货数量
     */
    @ExcelProperty(value = "发货数量")
    @ApiModelProperty(value = "发货数量")
    private Integer sendQty;

    /**
     * 发货金额
     */
    @ExcelProperty(value = "发货金额")
    @ApiModelProperty(value = "发货金额")
    private BigDecimal sendAmount;

    /**
     * 退货数量
     */
    @ExcelProperty(value = "退货数量")
    @ApiModelProperty(value = "退货数量")
    private Integer returnQty;

    /**
     * 退货金额
     */
    @ExcelProperty(value = "退货金额")
    @ApiModelProperty(value = "退货金额")
    private BigDecimal returnAmount;

    /**
     * 收款日期
     */
    @ExcelProperty(value = "收款日期", converter = DateFormatConvert.class)
    @ApiModelProperty(value = "收款日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date receiveDate;

    /**
     * 收款金额
     */
    @ExcelProperty(value = "收款金额")
    @ApiModelProperty(value = "收款金额")
    private BigDecimal receiveAmount;

    /**
     * 退款日期
     */
    @ExcelProperty(value = "退款日期", converter = DateFormatConvert.class)
    @ApiModelProperty(value = "退款日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date refundDate;

    /**
     * 退款金额
     */
    @ExcelProperty(value = "退款金额")
    @ApiModelProperty(value = "退款金额")
    private BigDecimal refundAmount;

    /**
     * 保证金退款金额
     */
    @ExcelProperty(value = "保证金退款金额")
    @ApiModelProperty(value = "保证金退款金额")
    private BigDecimal depositRefundAmount;

    /**
     * 系统调账日期
     */
    @ExcelProperty(value = "系统调账日期", converter = DateFormatConvert.class)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "系统调账日期")
    private Date sysAdjustDate;

    /**
     * 系统调账数量
     */
    @ExcelProperty(value = "系统调账数量")
    @ApiModelProperty(value = "系统调账数量")
    private Integer sysAdjustQty;

    /**
     * 系统调整金额
     */
    @ExcelProperty(value = "系统调整金额")
    @ApiModelProperty(value = "系统调整金额")
    private BigDecimal sysAdjustAmount;

    /**
     * 财务调账日期
     */
    @ExcelProperty(value = "财务调账日期", converter = DateFormatConvert.class)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "财务调账日期")
    private Date finAdjustDate;

    /**
     * 财务调账数量
     */
    @ExcelProperty(value = "财务调账数量")
    @ApiModelProperty(value = "财务调账数量")
    private Integer finSysAdjustQty;

    /**
     * 财务调整金额
     */
    @ExcelProperty(value = "财务调帐金额")
    @ApiModelProperty(value = "财务调帐金额")
    private BigDecimal finAdjustAmount;

    /**
     * 差异数量
     */
    @ExcelProperty(value = "差异数量")
    @ApiModelProperty(value = "差异数量")
    private Integer diffQty;

    /**
     * 应收账款余额
     */
    @ExcelProperty(value = "应收账款余额")
    @ApiModelProperty(value = "应收账款余额")
    private BigDecimal receivableAmount;

    /**
     * 业务日期
     */
    @ExcelProperty(value = "业务日期", converter = DateFormatConvert.class)
    @ApiModelProperty(value = "业务日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @NotNull(message = "业务日期不能为空")
    private Date businessDate;

    /**
     * 是否需要稽核0:否,1:是
     */
    @ExcelProperty(value = "是否需要稽核", converter = OrderIsAduitConverter.class)
    @ApiModelProperty(value = "是否需要稽核")
    private Integer isAduit;

    private Integer orderAuditMainType;

    /**
     * 订单稽核主类别名称
     */
    @ExcelProperty(value = "订单稽核主类别名称")
    @ApiModelProperty(value = "订单稽核主类别名称")
    private String orderAuditMainTypeName;


    private Integer orderAuditDtlType;

    /**
     * 订单稽核明细类别
     */
    @ExcelProperty(value = "订单稽核细类名称")
    @ApiModelProperty(value = "订单稽核细类名称")
    private String orderAuditDtlTypeName;

    /**
     * 异常售后未提报金额
     */
    @ExcelProperty(value = "异常售后未提报金额")
    @ApiModelProperty(value = "异常售后未提报金额")
    private BigDecimal diffAbnormalAmount;

    /**
     * 是否推送
     */
    @ExcelProperty(value = "是否推送")
    @ApiModelProperty(value = "是否推送")
    private String isPush;

    /**
     * 订单稽核状态名称
     */
    @ExcelProperty(value = "稽核状态")
    @ApiModelProperty(value = "稽核状态")
    private String orderBillStatusName;

    /**
     * 单据编号
     */
    @ExcelProperty(value = "单据编号")
    @ApiModelProperty(value = "单据编号")
    private String billNo;

    /**
     * 生效时间
     */
    private Date effectiveDate;

    /**
     * 终止日期
     */
    private Date expiredDate;

    /**
     * 事务号,-1表示完成提交,数据可用
     */
    private Integer transactionalNo;

    /**
     *
     */
    private Integer countSum;


}
